--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 63f836b03d64eac4fa716b2ada23ab565c2b455e
Parents : 7df92c8
Author : Ivan <e46112d44649266d71fe2193e00a4710>
Signature : T66BB85Valid, signed by author
Date : 2026-07-18T05:33:52-05:00
fix: update axios mock to use POST method for call initiation in regression tests
Changes
2 files changed, 8 insertions(+), 3 deletions(-)
Diff
diff --git a/meshchatx.rsm b/meshchatx.rsm
index 063added..e9564215 100644
Binary files a/meshchatx.rsm and b/meshchatx.rsm differ
diff --git a/tests/frontend/CallCodec2Regressions.test.js b/tests/frontend/CallCodec2Regressions.test.js
index 6ccccdee..b59ffb07 100644
--- a/tests/frontend/CallCodec2Regressions.test.js
+++ b/tests/frontend/CallCodec2Regressions.test.js
@@ -96,7 +96,12 @@ describe("Call dial / contact regressions", () => {
}
return Promise.resolve({ data: {} });
}),
- post: vi.fn().mockResolvedValue({ data: {} }),
+ post: vi.fn().mockImplementation((url) => {
+ if (String(url).includes("/api/v1/telephone/call/")) {
+ return Promise.resolve({ data: { message: "Call initiation started" } });
+ }
+ return Promise.resolve({ data: {} });
+ }),
patch: vi.fn().mockResolvedValue({ data: {} }),
delete: vi.fn().mockResolvedValue({ data: {} }),
};
@@ -130,7 +135,7 @@ describe("Call dial / contact regressions", () => {
await wrapper.vm.$nextTick();
const hash32 = "cd".repeat(16);
await wrapper.vm.call(`please call ${hash32} now`);
- expect(axiosMock.get).toHaveBeenCalledWith(`/api/v1/telephone/call/${hash32}`);
+ expect(axiosMock.post).toHaveBeenCalledWith(`/api/v1/telephone/call/${hash32}`);
});
it("regression: dialer does not require 64-char hex", async () => {
@@ -138,7 +143,7 @@ describe("Call dial / contact regressions", () => {
await wrapper.vm.$nextTick();
const hash32 = "ef".repeat(16);
await wrapper.vm.call(hash32);
- expect(axiosMock.get).toHaveBeenCalledWith(`/api/v1/telephone/call/${hash32}`);
+ expect(axiosMock.post).toHaveBeenCalledWith(`/api/v1/telephone/call/${hash32}`);
});
it("regression: addContactFromHistory keeps identity and destination fields separate", async () => {
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────